#include <iostream>
#include <vector>
#include <string>


using std::string;
using std::vector;
using std::cout;
using std::endl;

int t4_17()
{
	vector<int> v{0,1,2,3,4, -1, 3};
	auto beg = v.begin();
	while (beg != v.end() && *beg >= 0)
	{

		cout << *++beg << endl;
	}
	return 0;
}

int t4_21()
{
	vector<int> v{1,3,4,5,6,2,8,7};
	for (auto &i: v)
	{
		i = (i % 2 == 0) ? i : 2 * i;
	}

	for (auto i: v)
	{
		cout << i << " ";
	}

	cout << "-----------t4_23------------" << endl;
	string s = "word";
	string p1 = s + (s[s.size() - 1] == 's' ? "" : "s");
	cout << p1;
	return 0;
}

int t4_28()
{

	cout << "size of short: " << sizeof(short) << endl
			<< "size 0f int: " << sizeof(int) << endl
			<< "size of long: " << sizeof(long) << endl
			<< "size of long long: " << sizeof(long long int) << endl
			<< "size of float: " << sizeof(float) << endl
			<< "size of double: " << sizeof(double) << endl
			<< "size of char: " << sizeof(char) << endl
			<< "size of wchar_t: " << sizeof(wchar_t) << endl
			<< "size of char16_t: " << sizeof(char16_t) << endl
			<< "size of unsigned int: " << sizeof(unsigned) << endl
			<< "size of unsigned long: " << sizeof(unsigned long) << endl;

	int a{0}, b{0};
	return 0;
}

int t4_30()
{

	int x{ 2 }, y{ 10 };
	double a{ 1 }, b{ 5 };
	cout << sizeof(x + y) << " " << sizeof(a < b) << " "
			<< sizeof(x + a) << " " << sizeof(t4_28());
	return 0;
}

int t4_36()
{

	int i = 2;
	double d = 5.0;
	int result = i * static_cast<int>(d);
	cout << result << endl;
	return 0;
}

int s4_12()
{
	if(!1)
		cout << "suibian" << endl;
	return 0;
}

int main04()
{
//	t4_17();
//	t4_21();
//	t4_28();
//	t4_30();
//	t4_36();
	s4_12();
	return 0;
}
